<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ArraPIQuestionnaireList.aspx.cs" Inherits="PHSRAG.Insight.Agreements.ArraPIQuestionnaireListPage" %>
<%@ Register Assembly="PHSRAG.WebControls" Namespace="PHSRAG.WebControls" TagPrefix="cc2" %>
<%@ Register Assembly="PHSRAG.Insight21.InsightWebControls" Namespace="PHSRAG.Insight21.InsightWebControls" TagPrefix="cc1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Principal Investigator Landing Page</title>
    <link href="../Insight21.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
		<table cellpadding="0" class="Container">
			<tr>
				<td>
					<asp:Panel ID="headerSection" runat="server">
						<table cellspacing="0" width="100%">
							<tr>
								<td>
									<cc1:Header ID="header" runat="server" />
								</td>
							</tr>
							<tr>
								<td>
									<cc1:AgreementsSubNavigation ID="agreementsSubNavigation"
                                        runat="server" OnNavigate="AgreementsSubNavigation_SubNavigate" />
								</td>
							</tr>
							<tr>
								<td>
									<cc2:BreadCrumb ID="breadCrumb" runat="server" HighlightCurrentPage="true" OnNavigate="BreadCrumb_Navigate" />
								</td>
							</tr>
						</table>
					</asp:Panel>
					<table id="dynamicTable" cellspacing="10" class="Invisible">
						<tr>
							<td>
								<cc2:Annunciator ID="annunciator" runat="server" ContainerID="dynamicTable" />
							</td>
						</tr>
					</table>
					<table>
						<tr>
							<td>
								<cc2:PostbackGuard ID="postbackGuard" runat="server" />
							</td>
						</tr>
					</table>
					<asp:Panel ID="gridContainer" runat="server" Visible="false">
                        <br />
                        <table class="PlaceBar" width="100%">
                            <tr>
                                <td class="PageName">
                                    &nbsp;&nbsp;<asp:Label ID="recordCount" runat="server"></asp:Label>&nbsp;Records
                                </td>
                                <td align="right">
                                    <cc2:DownloadBar ID="downloadBar" runat="server" EnableExcelLink="false" EnablePDFLink="false"></cc2:DownloadBar>
                                </td>
                            </tr>
                        </table>
                        <table width="100%">
                            <tr>
                                <td>
                                    <cc2:Pager ID="topPager" runat="server" OnFirstPage="Pager_OnFirstPage" OnLastPage="Pager_OnLastPage" OnPreviousPage="Pager_OnPreviousPage" OnNextPage="Pager_OnNextPage"></cc2:Pager>
                                </td>
                            </tr>
                        </table>     
                        <table cellspacing="0" width="100%">
                            <tr>
                                <td>
                                    <asp:GridView ID="gvPIQuestionnaires" runat="server" Width="100%" CssClass="DataGrid" 
                                         AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false"
                                         PagerSettings-Visible="False" OnSorting = "gvPIQuestionnaires_OnSorting" OnRowCreated="gvPIQuestionnaires_OnRowCreated"
                                         OnRowDataBound="gvPIQuestionnaires_RowDataBound">
                                        <HeaderStyle CssClass="DataGridHeader" />
                                        <FooterStyle CssClass="DataGridHeader" />
                                        <AlternatingRowStyle CssClass="DataGridAlternatingItem" />   
                                        <RowStyle CssClass="DataGridItem" />
                                        <Columns>
                                            <asp:BoundField DataField="PIName" HeaderText="PI Name" SortExpression="PIName" />
                                            <asp:BoundField DataField="FundNumber" HeaderText="Fund Number" SortExpression="FundNumber" />
                                            <asp:BoundField DataField="SponsorNumber" HeaderText="Award Number" SortExpression="SponsorNumber" />
                                            <asp:BoundField DataField="PIQuestionnaireId" HeaderText="PIQuestionnaireId" Visible="false" />
                                            <asp:BoundField DataField="QuarterStartDate" HeaderText="QuarterStartDate" Visible="false" />
                                            <asp:BoundField DataField="QuarterEndDate" HeaderText="QuarterEndDate" Visible="false" />
                                            <asp:BoundField DataField="LastNotified" HeaderText="Last Notified" SortExpression="LastNotified" />
                                            <asp:BoundField DataField="EventDate" HeaderText="Last Modified" SortExpression="EventDate" />
                                            <asp:TemplateField HeaderText="Reporting Period" SortExpression="QuarterEndDate">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblReportingPeriod" runat="Server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="PIQuestionnaireStatus" HeaderText="Status" SortExpression="PIQuestionnaireStatus" />
                                            <asp:TemplateField HeaderText="View Questionnaire">
                                                <ItemTemplate>
                                                    <a id="linkQuestionnaire" runat="server"></a>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Action">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="ibAction" runat="server" Visible="false" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                 </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc2:Pager ID="bottomPager" runat="server" OnFirstPage="Pager_OnFirstPage" OnLastPage="Pager_OnLastPage" OnPreviousPage="Pager_OnPreviousPage" OnNextPage="Pager_OnNextPage"></cc2:Pager>
                                </td>
                            </tr>
                        </table>                   
                    </asp:Panel>        
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="hdnSortColumn" runat="Server" Value="PIName" />
                    <asp:HiddenField ID="hdnSortOrder" runat="server" Value="ASC" />
                </td>
            </tr>
        </table>                                          
    </form>
</body>
</html>
